<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
	</head>
	<body>
		<div class="t"></div>
		<div class="t"></div>
		<script>
			/*String*/
			String.prototype.trim = function() {
				return this.replace(/(^\s*)|(\s*$)/g, "");
			}
			var t1 = '   t   '
			console.log(t1.trim())
			/*Array*/
			var t2 = document.querySelectorAll('.t')
			console.log(Array.prototype.slice.call(t2, 0))
			/*Object*/
			function isType(type) {
				return function(obj) {
					return Object.prototype.toString.call(obj) === "[object " + type + "]"
				}
			}

			var isObject = isType("Object")

			var t3 = {};
			console.log(isObject(t3))
			/*Element*/
			Element.prototype.test = function() {
				console.log(this)
			}
			t2[0].test()
			/*Function*/
			Function.prototype.bind = function(scope) {
				var fn = this;
				return function() {
					return fn.apply(scope);
				};
			}
			var t4 = {
				value : 1
			}
			function t5() {
				console.log(this.value);
			}

			var t6 = t5.bind(t4)
			t6()
		</script>
	</body>
</html>